<template>
  <div>
    <div slot="com_header"><bread></bread></div>
    <div slot="com_con">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="id" label="序号" width="180">
        </el-table-column>
        <el-table-column prop="authName" label="权限名称" width="180">
        </el-table-column>
        <el-table-column prop="path" label="路径"> </el-table-column>
        <el-table-column  label="权限级别">
          <template slot-scope="{row}">
            <el-tag v-show="row.level==0">一级</el-tag>  
            <el-tag v-show="row.level==1" type="success">二级</el-tag>  
            <el-tag v-show="row.level==2" type="warning">三级</el-tag>  
          </template>  
        </el-table-column>
        
      </el-table>
    </div>
  </div>
</template>

<script>
import bread from "../../components/bread";
export default {
  components: {
    bread,
  },
  data() {
    return {
        tableData:[]
    };
  },
  mounted() {
    this.query();
  },
  methods: {
    //获取权限列表
    async query() {
      let rst = await this.$http.get("rights/list");
      this.tableData=rst.data
      console.log(rst);
    },
  },
};
</script>

<style lang="less" scoped>
</style>